This description relates to detecting the location of a vehicle, and more particularly to monitoring the position of a vehicle with respect to a predetermined virtual boundary.
Without some type of reliable monitoring system, companies that use large fleets of vehicles are subject to misuse or theft of their fleet vehicles. For example, it is likely that some vehicles in a large fleet will be used by employees without authorization or will at least occasionally be the target of auto thieves. In addition, even employees who are authorized to use a vehicle for some purposes may, in some instances, deviate from an authorized route or otherwise make an unauthorized use of the vehicle. One way to reduce these problems is to install tracking devices in the vehicles of a fleet. Such tracking devices can enable a fleet manager to monitor the location of vehicles of the fleet.
To simplify the monitoring process, a xe2x80x9cgeo-fencingxe2x80x9d routine may be used to allow a fleet manager to establish a virtual boundary around a predetermined location for purposes of automatically notifying the fleet manager when a vehicle crosses the boundary.
Techniques are provided for monitoring a location of a vehicle or other mobile device. In one implementation, a route can be defined as a collection of overlapping rectangular boundaries in a coordinate system. Each rectangle is then transformed by rotating the rectangle by a corresponding angle such that the sides of the rotated rectangle are parallel to the axes of the coordinate system. Coordinates for each rotated rectangle, along with the corresponding angle, are stored in a device to be monitored. Subsequently, coordinates associated with the current position of the monitored device are compared with one or more rectangles in the route by rotating the monitored device coordinates by one of the corresponding angles and comparing the rotated position coordinates with the appropriate rotated rectangle. If the current position is outside of the route, some predefined action, such as notifying a fleet dispatch manager, can be initiated.
The more complex calculations, namely the calculation of the angle and the rotation of the boundary by the angle, can be performed on a desktop computer or other device with significant processing power. This allows an embedded device or other device to be monitored to conveniently and efficiently determine whether it is located inside or outside of a predefined boundary without requiring substantial processing resources. For example, the monitored device can simply compare rotated coordinates associated with its current location with coordinates defining two opposite comers of a rotated rectangular boundary to determine if the monitored device is within the predefined boundary.
In one general aspect, a boundary that includes at least one straight edge within a coordinate system is selected. An angle between a selected straight edge of the boundary and an axis of the coordinate system is calculated, and the boundary is rotated by the calculated angle such that the selected straight edge of the rotated boundary is parallel to the axis of the coordinate system. When a set of coordinates associated with a particular location of the vehicle or other monitored device is identified, the identified set of coordinates is rotated by the previously-calculated angle. Finally, the rotated set of coordinates is compared to the rotated boundary to determine a location of the monitored device with respect to the boundary.
Implementations may include one or more of the following features. For example, the boundary can be a rectangle and the comparison of the rotated coordinates to the boundary can involve determining if the particular location is within the rectangle. If not, then the location might be compared to an adjacent rectangle in a collection of rectangles that define a route. The adjacent rectangle can also be rotated so that its sides are parallel to the coordinate axis, and the location coordinates can be rotated by the same angle as the adjacent rectangle to simplify the comparison process. Each rectangle can be defined by coordinates of two opposite comers of the rectangle. The boundary can also be a straight line having endpoints that are rotated by a corresponding angle. A pre-selected response can be initiated depending on the outcome of the comparison.
In another general aspect, a system for facilitating location monitoring may include a locator operable to identify a location of a monitored device, a memory, and a processor. The memory stores at least one angle of rotation and one or more sets of rotated coordinates. The rotated coordinates are associated with a predetermined boundary in a coordinate system, and correspond to original coordinates that define the predetermined boundary. Each of the original coordinates can be rotated by a corresponding angle of rotation to generate the corresponding rotated coordinates prior to storing the rotated coordinates in the memory. The rotated coordinates define at least one segment of a rotated boundary. The processor rotates coordinates representing the identified location by at least one of the stored angles of rotation to calculate rotated location coordinates. In addition, the processor compares the rotated location coordinates with at least two of the rotated coordinates to determine a relative position between the monitored device and the predetermined boundary.
In some implementations, the system may include one or more of the following features. For example, the monitored device can include the locator, the memory, and the processor.
The system might also include a mobile transmitter operable to selectively send a message based on the position of the monitored device relative to the predetermined boundary. The system may include a remote device operable to receive the message and initiate a predetermined response to the message.
The memory can store data corresponding to segments of the rotated boundary, with each segment identified by at least two sets of routed coordinates and having an associated angle of rotation. In such an implementation, the boundary may represent a geographic route and each segment comprises a rectangle defining a portion of the route. A second processor can be used to calculate the angle of rotation and to rotate the boundary prior to storing the angle and rotated coordinates in the memory. Each angle of rotation is defined by an angle between an axis of the coordinate system and a straight edge of the predetermined boundary associated with the original coordinates to be rotated. Each segment of the rotated boundary can have at least one edge that is parallel to an axis of the coordinate system. The locator can be a GPS receiver.
In yet another general aspect, monitoring a location of a vehicle may include storing at least two sets of rotated coordinates associated with a predetermined rectangular boundary. The rotated coordinates correspond to at least two sets of original coordinates that define the predetermined rectangular boundary in a coordinate system. Each set of original coordinates is rotated by an angle of rotation to generate the corresponding set of rotated coordinates prior to storing each set of rotated coordinates. The rotated coordinates define a rotated rectangular boundary having sides that are parallel to axis of the coordinate system. The angle of rotation, which is defined by an angle between one of the axes of the coordinate system and a side of the predetermined rectangular boundary, is then stored. Subsequently, a location of a vehicle is identified, and coordinates representing the identified location of the vehicle are rotated by the angle of rotation to generate a rotated set of location coordinates. Finally, the rotated set of location coordinates is compared with the sets of rotated coordinates to determine a relative position between the vehicle and the predetermined rectangular boundary.